/**
 * @author zhangshuai
 * @version V1.0
 * @Project Java2_26
 * @Package PACKAGE_NAME
 * @Description:
 * @Date 2025/5/14 16:20
 */
//声明教师类为抽象类
public abstract class Teacher {
    //抽象方法
    public abstract void teach();

    public abstract void sport();

    public void eat(){
        System.out.println("吃");
    }
}
//
class MathTeacher extends Teacher{
    @Override
    public void teach() {
        System.out.println("教数学");
    }

    @Override
    public void sport() {
        System.out.println("踢足球");
    }

    public static void main(String[] args) {
        MathTeacher mathTeacher = new MathTeacher();

        mathTeacher.teach();
        mathTeacher.sport();
        mathTeacher.eat();
    }
}